/**
 * Created by Administrator on 2018/9/6.
 */

/*登录接口的方法*/
function Logincheck(){
    var account=$('.input-formpeople').val();
    var password=$('.input-formpassword').val();
    console.log(account,password);
    $.ajax({
        url: apiDomain + login,
        xhrFields: {
            withCredentials: true
        },
        type: 'POST',
        crossDomain: true,
        data: {
            account: account,
            password: password
        },
        success:function(data){
            if(data.msg=="登录失败，请检查用户名和密码"){
                layer.msg("登录失败，请检查用户名和密码")
            }else{
                localStorage.setItem('username',account);
                window.location.href = "index.html";
            }
        }
    })
}

function tour(){
    localStorage.setItem('username','游客')
    window.location.href = "index.html";
}